package com.bdqn.controller;

import com.bdqn.pojo.HisPatient;
import com.bdqn.pojo.HisRegistration;
import com.bdqn.service.HisPatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/hisPatient")
public class HisPatientController {
    @Autowired
    HisPatientService hisPatientService;
    @GetMapping("/getIdCardAll")
    public HisPatient getIdCardAll(String idCard){
        HisPatient hisPatient = hisPatientService.getIdCardAll(idCard);
        return hisPatient;
    }
    @PostMapping("/addHisPatient")
    public String addHisPatient(@RequestBody HisPatient hisPatient){
        String hisPatientId = hisPatientService.addHisPatient(hisPatient);
        return hisPatientId;
    }
    //查询患者信息
    @GetMapping("receiveAPatientForTreatment")
    public HisPatient receiveAPatientForTreatment(String id){
        HisPatient hisPatient = hisPatientService.receiveAPatientForTreatment(id);
        return hisPatient;
    }
}
